package com.project.service.impl;

import com.project.mapper.AccountMapper;
import com.project.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountMapper accountMapper;

    @Override
    public void register(String username, String password, int type) {
        if (type == 1) {
            accountMapper.addperson(username, password);
        } else if (type == 2) {
            String companyname = username;
            accountMapper.addcompany(companyname,password);
        }
    }
}
